#version 330
in  vec3 inPosition;
in  vec3 inColor;
uniform  mat4 inModelMatrix;
uniform  mat4 inViewMatrix;
uniform  mat4 inProjectionMatrix;

uniform float inHalfEyesWidth;

out vec4 leftEyePosition;
out vec4 rightEyePosition;

uniform int positionsLength;

void main(void)
{
	mat4 Td = mat4(1);
	mat4 Tid = mat4(1);
	Td[3][0] = inHalfEyesWidth;
	Tid[3][0] = -inHalfEyesWidth;
	leftEyePosition = Tid * inProjectionMatrix * Td * inViewMatrix * inModelMatrix * vec4(inPosition, 1.0);
	rightEyePosition =  Td * inProjectionMatrix * Tid * inViewMatrix * inModelMatrix * vec4(inPosition, 1.0);
}
